<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <title>amis demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="/amis/sdk.css" />
    <link rel="stylesheet" href="/amis/helper.css" />
    <link rel="stylesheet" href="/amis/iconfont.css" />

    <!-- Stylesheets -->
    <!-- Page JS Plugins CSS -->
     
    {notempty name="extend_css_list"}
        {volist name="extend_css_list" id="vo"}
            {volist name="vo" id="v"}
            <link rel="stylesheet" href="{$v}?v={:time()}">
            {/volist}
        {/volist}
    {/notempty} 

    {block name="plugins-css"}{/block}
    <link rel="stylesheet" href="/amisplugin/spreadsheet/jspreadsheet.css" type="text/css"/>
    <link rel="stylesheet" href="/amisplugin/spreadsheet/jsuites.css" type="text/css"/>

    <style>
        html,
        body,
        .app-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
</head>

<body>
    <div id="root" class="app-wrapper"></div>
    <script src="/amisplugin/spreadsheet/jspreadsheet.js"></script>
    <script src="/amisplugin/spreadsheet/jsuites.js"></script>
    <script src="/amis/sdk.js"></script>
        
    <!-- Page JS Plugins -->

    {notempty name="extend_js_list"}
        {volist name="extend_js_list" id="vo"}
            {volist name="vo" id="v"}
            <script src="{$v}?v={:time()}"></script>
            {/volist}
        {/volist}
    {/notempty}
 
    <script type="text/javascript">
        (function () {
            window.enableAMISDebug = true;
            let amis = amisRequire('amis/embed');
            // 通过替换下面这个配置来生成不同页面
            let amisJSON = {:json_encode($amisJSON, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE) };
            let amisScoped = amis.embed('#root', amisJSON);
            let   scrollHeight =  document.body.scrollHeight - 10;
              window.parent.postMessage(
                {
                    type: 'amis:resize',
                    data: {
                        height: scrollHeight
                    }
                },
                '*'
            );
        })();
    </script>
</body>

</html>